package com.example.studentservice.controller;

import com.example.studentservice.mapper.StudentMapper;
import com.example.studentservice.mapper.UserMapper;
import com.example.studentservice.po.Student;
import com.example.studentservice.po.User;
import org.example.infrastructure.utils.Msg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @ClassName: CourseController
 * @Description:
 * @Author: YourName
 * @Date: 2023/10/27
 * 12121212121
 */
@RestController
@RequestMapping("user")
public class StudentController {

    @Autowired
    private UserMapper userMapper;
    @Autowired
    private StudentMapper studentMapper;


    @GetMapping("/dd/{xh}")
    public String getUserId(@PathVariable String xh){
        String succ = Msg.success();
        System.out.print(succ);
        return "就git托管啦你要找"+xh;
    }


    @GetMapping("testJsp")
    public String testJsp(){
      return "test";
    }

    @GetMapping("getUser")
    @ResponseBody
    public void getUser(){
        Student student = studentMapper.selectById("111");
        System.out.println(student);
    }

}

